Skip to content

Bump default plugin versions to latest stable 3.x - #13076

Draft
ascheman wants to merge 1 commit into
apache:maven-4.0.xfrom
aschemaven:feature/40-default-plugin-versions
Draft

Bump default plugin versions to latest stable 3.x#13076
ascheman wants to merge 1 commit into
apache:maven-4.0.xfrom
aschemaven:feature/40-default-plugin-versions

Conversation

@ascheman

@ascheman ascheman commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Draft — held intentionally. Waiting on Slawek's in-flight plugin releases (notably install/deploy) and the master update; the targets will be refreshed and this marked ready once those land. Opened as a draft now to signal intent and track the change.

The 4.x lines bind a fixed version to every plugin of the default, clean and site lifecycles, hardcoded as Java constants in two files:

  • impl/maven-core/src/main/java/org/apache/maven/lifecycle/providers/packaging/AbstractLifecycleMappingProvider.java (11 plugins)
  • impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java (clean, site)

Unlike the 3.10 line (which inherits version.maven-* from the ASF parent), these constants have no refresh mechanism and had drifted to ~mid-2024 values. This bumps all 13 to the latest stable 3.x:

Plugin before after
clean 3.4.0 3.5.0
resources 3.3.1 3.5.0
compiler 3.13.0 3.16.0
surefire 3.5.2 3.6.0
install 3.1.3 3.1.4
deploy 3.1.3 3.1.4
jar 3.4.2 3.5.1
ear 3.3.0 3.4.0
ejb 3.2.1 3.3.0
plugin 3.15.1 3.15.2
rar 3.0.0 3.1.0
war 3.4.0 3.5.1
site 3.21.0 3.22.0

All targets are the latest < 4.0.0 release on Central, each requiring Maven >= 3.6.3 and Java >= 8, so they are safe as defaults on this line; the 3.x plugin lines keep the Maven 3+4 compatibility layer, delivering accumulated fixes without breaking changes.

Notably maven-compiler-plugin moves off 3.13.0, which carries MCOMPILER-592 (empty project.build.outputTimestamp -> IndexOutOfBoundsException, fixed in 3.14.0) — reachable with default settings.

Follow-up (separate): these constants live in two files with no bot-visible coordinate, so nothing keeps them current. Converging them onto the 3.10 filtered-plugin-versions.properties mechanism would let Dependabot propose future bumps.

Refresh the compiled-in default lifecycle plugin versions to the latest stable 3.x releases (Maven 3+4 compatible, JDK 8+). The 4.x lines hardcode these as Java constants with no refresh mechanism and had drifted to ~mid-2024 values.

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the version bump, Gerd — the intent is exactly right and CI is green across the board.

One miss: maven-plugin-plugin 3.16.0 was released on Sep 6 (two days before this PR), so 3.15.2 → 3.16.0 should be included.

Also, the PR description still says "Draft — held intentionally" but the PR is no longer a draft. Might want to update the description now that it's ready for review.

The follow-up idea (converging onto a plugin-versions.properties mechanism) would be a nice improvement — these constants are invisible to Dependabot as-is.

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified all 13 plugin versions against Maven Central — each is the latest stable 3.x release as of today, with one exception already noted by @gnodet:

Plugin PR version Latest 3.x
clean 3.5.0 3.5.0
resources 3.5.0 3.5.0
compiler 3.16.0 3.16.0
surefire 3.6.0 3.6.0
install 3.1.4 3.1.4
deploy 3.1.4 3.1.4
jar 3.5.1 3.5.1
ear 3.4.0 3.4.0
ejb 3.3.0 3.3.0
plugin 3.15.2 3.16.0 (Sep 6) ⚠️
rar 3.1.0 3.1.0
war 3.5.1 3.5.1
site 3.22.0 3.22.0

All targeted versions require Maven ≥ 3.6.3 and Java ≥ 8 — safe as defaults on the 4.0.x line.

Only action needed: bump PLUGIN_PLUGIN_VERSION from 3.15.23.16.0 as @gnodet flagged.

📋 PR Metadata

Aspect Current Suggested
Category (unlabeled) maintenance
Milestone (none) 4.0.0-rc-7 or next 4.0.x

Backport status: NOT_NEEDED — these are 4.x-specific hardcoded constants with no equivalent in the 3.x line.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude on behalf of @gnodet


protected static final String WAR_PLUGIN_VERSION = "3.4.0";
protected static final String WAR_PLUGIN_VERSION = "3.5.1";
// END SNIPPET: versions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maven-plugin-plugin 3.16.0 was released on Sep 6, 2026 — two days before this PR. Should be:

Suggested change
// END SNIPPET: versions
protected static final String PLUGIN_PLUGIN_VERSION = "3.16.0";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants